using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SearchFriendRequest : GeneratedMessageLite<SearchFriendRequest, SearchFriendRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SearchFriendRequest, SearchFriendRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SearchFriendRequest result;
			protected override SearchFriendRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SearchFriendRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SearchFriendRequest DefaultInstanceForType
			{
				get
				{
					return SearchFriendRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public Builder()
			{
				this.result = SearchFriendRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SearchFriendRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SearchFriendRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SearchFriendRequest other = this.result;
					this.result = new SearchFriendRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SearchFriendRequest.Builder Clear()
			{
				this.result = SearchFriendRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SearchFriendRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SearchFriendRequest.Builder(this.result);
				}
				return new SearchFriendRequest.Builder().MergeFrom(this.result);
			}
			public override SearchFriendRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SearchFriendRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SearchFriendRequest)
				{
					return this.MergeFrom((SearchFriendRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SearchFriendRequest.Builder MergeFrom(SearchFriendRequest other)
			{
				return this;
			}
			public override SearchFriendRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SearchFriendRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SearchFriendRequest._searchFriendRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SearchFriendRequest._searchFriendRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasUserName = input.ReadString(ref this.result.userName_);
						}
					}
					else
					{
						BaseRequest.Builder builder = BaseRequest.CreateBuilder();
						if (this.result.hasBaseRequest)
						{
							builder.MergeFrom(this.BaseRequest);
						}
						input.ReadMessage(builder, extensionRegistry);
						this.BaseRequest = builder.BuildPartial();
					}
				}
				return this;
			}
			public SearchFriendRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SearchFriendRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SearchFriendRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SearchFriendRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SearchFriendRequest.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public SearchFriendRequest.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		private static readonly SearchFriendRequest defaultInstance;
		private static readonly string[] _searchFriendRequestFieldNames;
		private static readonly uint[] _searchFriendRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasUserName;
		private string userName_ = "";
		private int memoizedSerializedSize = -1;
		public static SearchFriendRequest DefaultInstance
		{
			get
			{
				return SearchFriendRequest.defaultInstance;
			}
		}
		public override SearchFriendRequest DefaultInstanceForType
		{
			get
			{
				return SearchFriendRequest.DefaultInstance;
			}
		}
		protected override SearchFriendRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.UserName);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SearchFriendRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] searchFriendRequestFieldNames = SearchFriendRequest._searchFriendRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, searchFriendRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasUserName)
			{
				output.WriteString(2, searchFriendRequestFieldNames[1], this.UserName);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SearchFriendRequest searchFriendRequest = value as SearchFriendRequest;
			return searchFriendRequest != null && (this.hasBaseRequest == searchFriendRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(searchFriendRequest.baseRequest_))) && (this.hasUserName == searchFriendRequest.hasUserName && (!this.hasUserName || this.userName_.Equals(searchFriendRequest.userName_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SearchFriendRequest, SearchFriendRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SearchFriendRequest, SearchFriendRequest.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
		}
		public static SearchFriendRequest ParseFrom(byte[] data)
		{
			return SearchFriendRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SearchFriendRequest MakeReadOnly()
		{
			return this;
		}
		public static SearchFriendRequest.Builder CreateBuilder()
		{
			return new SearchFriendRequest.Builder();
		}
		public override SearchFriendRequest.Builder ToBuilder()
		{
			return SearchFriendRequest.CreateBuilder(this);
		}
		public override SearchFriendRequest.Builder CreateBuilderForType()
		{
			return new SearchFriendRequest.Builder();
		}
		public static SearchFriendRequest.Builder CreateBuilder(SearchFriendRequest prototype)
		{
			return new SearchFriendRequest.Builder(prototype);
		}
		static SearchFriendRequest()
		{
			SearchFriendRequest.defaultInstance = new SearchFriendRequest().MakeReadOnly();
			SearchFriendRequest._searchFriendRequestFieldNames = new string[]
			{
				"BaseRequest",
				"UserName"
			};
			SearchFriendRequest._searchFriendRequestFieldTags = new uint[]
			{
				10u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.SearchFriendRequest.Descriptor, null);
		}
	}
}
